package club.emergency.wechat.department.operate;

import club.emergency.wechat.model.department.Department;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Create with IntelliJ IDEA
 * Project Name: wechat
 * Package Name: club.emergency.wechat.department.operate
 * Date: 2019/3/20
 *
 * @author: 快乐的小菌菌
 * Description:
 */
public interface DepartmentOperate {

    /**
     * 新增企业信息，最大到5级
     *
     * @param department 部门pojo
     * @param parentCode 父部门code
     * @return 以字符串形式返回
     */
    @PostMapping("/department-operate-provider/save")
    String save(@RequestBody Department department, @RequestParam(value = "parentCode", required = false) String parentCode);

    /**
     * 修改部门信息
     *
     * @param department 部门pojo
     * @param parentCode 父code
     * @return 以字符串形式返回
     */
    @PostMapping("/department-operate-provider/modify")
    String modify(@RequestBody Department department, @RequestParam(value = "parentCode",required = false) String parentCode);

    /**
     * 删除部门信息
     *
     * @param id 部门id
     * @return 以字符串形式返回
     */
    @PostMapping("/department-operate-provider/remove")
    String remove(@RequestParam("id") Long id);
}
